package com.neu.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.neu.domain.CheckApp;
import com.neu.mapper.CheckAppMapper;
import com.neu.service.CheckAppService;

//应该交给spring的容器来管理,而不是springMVC容器

@Service("checkAppService")
public class CheckAppServiceImpl implements CheckAppService{
	@Autowired
	private CheckAppMapper checkAppMapper;

	@Override
	public boolean addCheckApp(CheckApp checkApp) {
		int row=checkAppMapper.addCheckApp(checkApp);
		if(row>0) {
			return true;
		}
		return false;
	}

	@Override
	public List<CheckApp> findCheckAppByPersonid(Integer personid) {
		
		return checkAppMapper.findCheckAppByPersonid(personid);
	}

	@Override
	public boolean delCheckAppById(Integer checkappid) {
		int row=checkAppMapper.delCheckAppById(checkappid);
		if(row>0) {
			return true;
		}
		return false;
	}

	@Override
	public List<CheckApp> findChargeByPersonid(Integer personid) {
		
		return checkAppMapper.findChargeByPersonid(personid);
	}

	@Override
	public boolean updatePaystateById(Integer checkappid) {
		int row=checkAppMapper.updatePaystateById(checkappid);
		if(row>0) {
			return true;
		}
		return false;
	}
	
}